#nav-dropdown-content-user-history {
    max-width: none;
}

#nav-dropdown-content-user-history-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 200px;
    color: transparentize($tlp-theme-color, .8);

    &.shown {
        display: flex;
    }

    > .empty-history-icon {
        margin: 0 0 15px;
        font-size: 40px;
    }

    > .empty-history-description {
        font-size: 22px;
    }
}

#nav-dropdown-content-user-history-error-message-fetch,
#nav-dropdown-content-user-history-error-message-clear {
    display: none;
    width: 510px;
    margin: $tlp-spacing;
    font-size: 16px;
    white-space: normal;

    &.shown {
        display: block;
    }
}

#nav-dropdown-content-user-history-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 200px;
    background: url('../images/spinner.gif') no-repeat center center;

    &.shown {
        display: block;
    }
}

#nav-dropdown-content-user-history-content {
    display: none;
    flex-direction: column;
    width: 550px;
    max-height: 70vh;
    overflow-y: auto;

    &.shown {
        display: flex;
    }
}

#nav-dropdown-content-user-history-clear {
    display: none;
    justify-content: center;
    padding: $tlp-spacing;
    border-top: 1px solid $tlp-ui-border-light;

    &.shown {
        display: flex;
    }
}

.history-item {
    display: flex;
    position: relative;
    flex: 1 0 auto;
    align-items: center;
    padding: $tlp-spacing;
    border-bottom: 1px solid $tlp-ui-border-light;
    color: $tlp-typo-default-text-color;
    text-decoration: none;

    &:last-child {
        border-bottom: 0;
    }

    &:hover {
        background-color: transparentize($tlp-theme-color, .9);
        text-decoration: none;
        cursor: pointer;

        .history-item-content-description-info {
            transform: translateY(-10px);
            transition: transform 50ms 500ms;
        }

        .history-item-content-description-links {
            transform: translateY(-2px);
            transition: transform 50ms 500ms, opacity 50ms 500ms;
            opacity: 1;
            pointer-events: auto;
        }
    }
}

.history-item-icon {
    margin: 0 $tlp-half-spacing 0 0;
}

.history-item-content {
    display: flex;
    flex-grow: 1;
    align-items: center;
}

.history-item-content-description {
    flex-grow: 1;
    margin: 0 $tlp-spacing 0 0;
}

.history-item-content-description-info {
    display: flex;
    align-items: center;
    transition: transform 50ms;
}

.history-item-content-description-info-badge {
    margin: 0 5px 0 0;
}

.history-item-content-description-info-title {
    max-width: 200px;
    font-size: 14px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.history-item-content-description-links {
    position: absolute;
    transition: transform 50ms, opacity 50ms;
    opacity: 0;
    pointer-events: none;
}

.history-item-content-description-link {
    margin: 0 10px 0 0;
    color: $tlp-theme-color;
    font-size: 12px;

    &:hover {
        text-decoration: underline;
    }
}

.history-item-content-description-link-icon {
    margin: 0 3px 0 0;
}

.history-item-content-project {
    max-width: 150px;
    color: $tlp-ui-dimmed;
    text-align: right;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;

    &:hover > .history-item-content-project-name {
        text-decoration: underline;
    }

    > .tuleap-svg-project-small {
        flex: 0 0 auto;
        margin: 0 5px 0 0;
        fill: $tlp-ui-dimmed;
    }
}

.history-item-content-project-name {
    line-height: 16px;
    white-space: normal;
}

@for $i from 1 through length($tlp-swatch-color-names) {
    .history-item-icon-#{nth($tlp-swatch-color-names, $i)} > svg {
        fill: transparentize(nth($tlp-swatch-color-primaries, $i), .7);
    }
}
